<template>
	<view class="details">
		 <archivesView :userInfo='userInfo' :type="type">
      </archivesView>
	</view>
</template>

<script>
import archivesView from "../components/archivesView.vue"
	import {
    teacherDetail 
	} from '@/api/archives.js'
	export default {
		data() {
			return {
        id:"",
        type:"1",
        userInfo:{}
			}
		},
    components:{
      archivesView
    },
    onLoad(option){
      this.id = option.id
      console.log(this.id)
      this.type = option.type
      this.getteacherDetailFn()
    },
		methods: {
      getteacherDetailFn(){
        teacherDetail({
          id:this.id
        }).then(res=>{
          if(res.code > 0){
            this.userInfo = res.data
          }
        })
      },
			
		}
	}
</script>

<style lang="less">
  .details{
    background: #f8f8f8;
  }
</style>
